public class RectTest {
    public static void main(String[] args) {
        //定义矩形对象
        Rect rect = new Rect();
        Rect rect1 = new Rect(2.3f,4.6f);
        rect.setWidth(5.1f);
        rect.setHeight(6.3f);
        rect.getArea();
        System.out.println("rect的宽度"+rect.getWidth());
        System.out.println("rect的高度"+rect.getHeight());
        System.out.println("rect的面积"+rect.getArea());

        //rect1 的情况
        System.out.println("rect的宽度"+rect1.getWidth());
        System.out.println("rect的高度"+rect1.getHeight());
        System.out.println("rect的面积"+rect1.getArea());
    }
}
